<?xml version='1.0' encoding='UTF-8' ?>
<!--

    Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.

    You may not modify, use, reproduce, or distribute this software except in
    compliance with  the terms of the License at:
    http://java.net/projects/javaeetutorial/pages/BerkeleyLicense

-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="/bookstoreTemplate.xhtml">

    <ui:define name="top"></ui:define> 
    <ui:define name="content">
        <h3>
            <h:outputFormat title="thanks"
                            value="#{bundle.ThankYouParam}">
                <f:param value="#{sessionScope.name}"/>
            </h:outputFormat>
        </h3>
        <p>
            <h:outputText value="#{bundle.ShipDate}"/>
            <h:outputText value="#{cashierBean.shipDate}">
                <f:convertDateTime type="date" dateStyle="full"/>
            </h:outputText>
            <h:outputText value="."/>
        </p>
        <p>
            <h:outputText value="#{bundle.NewsletterThanks}" rendered="#{!empty cashierBean.newsletters}"/>
            <ul>
                <ui:repeat value="#{cashierBean.newsletters}" var="nli">
                    <li><h:outputText value="#{nli}" /></li>
                </ui:repeat>
            </ul>
        </p>
        <p>
            <h:outputText value="#{bundle.DukeFanClubThanks}" 
                          rendered="#{cashierBean.specialOffer.isSelected()}"/>
        </p>
        <h:form>
            <p>
                <h:commandLink action="bookcatalog">
                    <h:outputText value="#{bundle.ContinueShopping}"/>
                </h:commandLink>
            </p>
        </h:form>
        <div class="messagecolor">
            <h:messages showSummary="true" 
                        showDetail="false"
                        errorStyle="color: #d20005" 
                        infoStyle="color: blue"/>
        </div>
    </ui:define>
</ui:composition>
